CREATE TABLE [dbo].[DnnProduct_SystemMessages]
(
[MessageID] [int] NOT NULL IDENTITY(1, 1),
[PortalID] [int] NULL,
[MessageName] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[MessageValue] [ntext] COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [dbo].[DnnProduct_SystemMessages] ADD CONSTRAINT [PK_DnnProduct_SystemMessages] PRIMARY KEY CLUSTERED  ([MessageID]) WITH (FILLFACTOR=85) ON [PRIMARY]
GO
ALTER TABLE [dbo].[DnnProduct_SystemMessages] ADD CONSTRAINT [IX_DnnProduct_SystemMessages] UNIQUE NONCLUSTERED  ([MessageName], [PortalID]) WITH (FILLFACTOR=85) ON [PRIMARY]
GO
ALTER TABLE [dbo].[DnnProduct_SystemMessages] WITH NOCHECK ADD CONSTRAINT [FK_DnnProduct_SystemMessages_DnnProduct_Portals] FOREIGN KEY ([PortalID]) REFERENCES [dbo].[DnnProduct_Portals] ([PortalID]) ON DELETE CASCADE NOT FOR REPLICATION
GO
